package asia.redact.bracket.exampleclasses;

import java.util.Map;

public class Person extends ExampleBase {

	Name name;
	Map<String,String> favorites;
	Map<String,Person> friends;
	HairColorEnum hairColor;
	
	public Person() {
		super();
	}

	public Person(Name name) {
		this.name = name;
	}

	public Name getName() {
		return name;
	}

	public void setName(Name name) {
		this.name = name;
	}

	public Map<String, String> getFavorites() {
		return favorites;
	}

	public void setFavorites(Map<String, String> favorites) {
		this.favorites = favorites;
	}

	public Map<String, Person> getFriends() {
		return friends;
	}

	public void setFriends(Map<String, Person> friends) {
		this.friends = friends;
	}

	public HairColorEnum getHairColor() {
		return hairColor;
	}

	public void setHairColor(HairColorEnum hairColor) {
		this.hairColor = hairColor;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((favorites == null) ? 0 : favorites.hashCode());
		result = prime * result + ((friends == null) ? 0 : friends.hashCode());
		result = prime * result
				+ ((hairColor == null) ? 0 : hairColor.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Person other = (Person) obj;
		if (favorites == null) {
			if (other.favorites != null)
				return false;
		} else if (!favorites.equals(other.favorites))
			return false;
		if (friends == null) {
			if (other.friends != null)
				return false;
		} else if (!friends.equals(other.friends))
			return false;
		if (hairColor != other.hairColor)
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}
	
	

}
